//对接口的二次封装。封装请求文章模块
import { get, post, del, put } from '../utils/request'

//文章分内列表
export const catListAPI = ()=>{
   return get('/news/cat/list')
}
//添加文章分类 post请求需要传递参数
export const catAddAPI = (data)=>{
   return post('/news/cat/add',data)
}
//删除文章分类 delete
export const catDelAPI = (params)=>{
   return del('/news/cat',params)
}
//修改文章分类 
export const catEidtAPI = (data)=>{
   return put('/news/cat/update',data)
}


//文章列表
export const newsListAPI = (params)=>{
   return get('/news/article/list',params)
}

//添加文章
export const newsAddAPI = (data)=>{
   return post('/news/article/add',data)
}

//修改文章
export const newsEditAPI = (data)=>{
   return put('/news/article/update',data)
}
//删除文章
export const newsDelAPI = (params)=>{
   return del('/news/article',params)
}